﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="_课堂练习4酒店预订.aspx.cs" Inherits="WebApplication1._课堂练习4酒店预订" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title></title>
    <style>
        .attention{
            color:darkgray;
        }
    </style>
</head>
<body>
    <h2>设计酒店预订的控件</h2>
    <form id="form1" runat="server">
        <div>
            预订人数：<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="TextBox1" Display="Dynamic" ErrorMessage="不可以留空  " ForeColor="Red"></asp:RequiredFieldValidator>
            <asp:RangeValidator ID="RangeValidator1" runat="server" ControlToValidate="TextBox1" Display="Dynamic" ErrorMessage="人数需要在1~20之间！" ForeColor="Red" MaximumValue="20" MinimumValue="1" Type="Integer"></asp:RangeValidator>
            <br />
            预订日期：<asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
            <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="TextBox2" Display="Dynamic" ErrorMessage="不可以留空  " ForeColor="Red"></asp:RequiredFieldValidator>
            <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="TextBox2" Display="Dynamic" ErrorMessage="日期格式不正确！" ForeColor="Red"></asp:RegularExpressionValidator>
            <br />
            电子邮件：<asp:TextBox ID="TextBox3" runat="server"></asp:TextBox>
            <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="TextBox3" Display="Dynamic" ErrorMessage="不可以留空  " ForeColor="Red"></asp:RequiredFieldValidator>
            <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" ControlToValidate="TextBox3" Display="Dynamic" ErrorMessage="email格式不正确！" ForeColor="Red" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"></asp:RegularExpressionValidator>
            <br />
            <br />
            <asp:Button ID="Button1" runat="server" Text="确定" />
            <br />

        </div>
    </form>
    <div class="attention">
        需要注意
        <ul>
            <li>人数在1~20之间</li>
            <li>日期格式dd/mm/yyyy</li>
            <li>邮件格式xxx@xxx.com</li>
        </ul>
    </div>
</body>
</html>
